package ru.evga.inse.core.dao;

import ru.evga.inse.core.exception.InfoseaException;

public class DaoException
    extends InfoseaException
{
    private static final String PREFIX = "core.dao.err.";
    /**
     * Entity ''{0}'' don't have field ''{1}''
     */
    public final static String IDS_ENTITY_DO_NOT_HAVE_FIELD = "entityDoNotHaveField";
    /**
     * Entity ''{0}'' with id={1} not found
     */
    public final static String IDS_ENTITY_WITH_ID_NOT_FOUND = "entityWithIdNotFound";
    
    /**
     * Id of ''{0}'' must not be null
     */
    public final static String IDS_ID_MUST_NOT_BE_NULL = "idMustNotBeNull";
    
    /**
     * Entity ''{0}'' must not be null
     */
    public final static String IDS_ENTITY_MUST_NOT_BE_NULL = "entityMustNotBeNull";
    
    
    public DaoException(String errorIds)
    {
        super(errorIds);
    }

    public DaoException(String errorIds, Object arg)
    {
        super(errorIds, arg);
    }
    
    public DaoException(String errorIds, Object[] args)
    {
        super(errorIds, args);
    }
    
    @Override
    protected String getPrefix()
    {
        return PREFIX;
    }
}
